{template /common/header}
<script type="text/javascript">
  $("body").addClass("login_body");
</script>
  <!-- S header -->
  <header class="login_header">
    <a href="/" class="headerL iconfont">&#xe66a;</a>
    <h1>登录</h1>
  </header>
  <!-- E header -->
  <div>
    <img src="{THEME_PATH}images/login.png" alt="" class="login_logo" width="132">
    <form action="{U('User/Api/login_wap')}" method="post" class="registerform" autocomplete="off">
    <ul class="login_box">
      <li>
        <input type="text"  placeholder="请输入手机号" name="username"  id="username" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" datatype="*" errormsg="请输入手机号" nullmsg='请输入手机号' class="input">
      </li>
      <li>
        <input type="password" placeholder="请输入登录密码"  autocomplete="off" name="password" id="password" datatype="*"  errormsg="请输入登录密码" nullmsg='请输入登录密码' class="input">
      </li>
      <li class="alignR forget_psd"><a href="{U('User/public/forget')}">忘记密码</a></li>
    </ul>
    <a href="javascript:;" class="service_affirm_btn login_sureBtn">确认</a>
    <p class="alignC without_account">没有账户，去<a href="{U('user/public/reg')}" class="red inline_block">注册</a></p>
  </div>
</body>
<script type="text/javascript">
  $(".login_sureBtn").click(function(){
    $(".registerform").submit();
  })
$(function() {
  $(".registerform").Validform({
    tiptype:function(msg,o,cssctl){
        if(o.type==1){
          o.obj.addClass("Validform_success")
        }
        if(o.type==3){
          layer.closeAll();
          //$(".errmsg").text(msg).show();
          tips(msg);
          return false;
        }
      },
    ajaxPost: true,
    callback: function(ret) {
      if (ret.status == 0) {
        $('#error').css('display', 'block');
        $('.input_1').focus(function(){
          $('#error').css('display', 'none');
        });
        $('#error').html(ret.info);
      } else {
        location.href = "/index.php?m=user&c=index&a=index";
      }
    }
  });
})  
</script>
</html>